import { gstyRequest } from '../'
//查看区域
export async function getAreaList(params) {
  return gstyRequest.get({
    url: 'calc/zone/list',
    showLoading: true,
    params
  })
}
//根据河系 查看区域
export async function getZonesListbyrs(params) {
  return gstyRequest.get({
    url: '/calc/basin/getZones',
    showLoading: true,
    params
  })
}
//查询区域预报断面
export async function getAreaSecList(params) {
  return gstyRequest.get({
    url: '/calc/zone/secList',
    showLoading: true,
    params
  })
}
//添加区域
export async function addArea(data) {
  return gstyRequest.post({
    url: '/calc/zone/add',
    showLoading: true,
    data
  })
}
//删除区域
export async function deleteArea(data) {
  return gstyRequest.post({
    url: '/calc/zone/delete',
    showLoading: true,
    data
  })
}
//查询区域计算方案
export async function getSchemeList(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/list',
    showLoading: true,
    params
  })
}
//删除区域方案
export async function deleteAreaScheme(data) {
  return gstyRequest.post({
    url: '/calc/zone/scheme/delete',
    showLoading: true,
    data
  })
}
//查询时效评定结果
export async function getDurResult(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/cc/durResult',
    showLoading: true,
    params
  })
}
//查询精度评定结果
export async function getEvaResult(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/cc/evaResult',
    showLoading: true,
    params
  })
}
//

//查看计算方案
export async function getCalculationSchemes(params) {
  return gstyRequest.get({
    url: '/calScheme/getCalculationSchemes',
    showLoading: true,
    params
  })
}
//查看区域方案的配置
export async function getAreaSchemeConfig(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/configure/params',
    showLoading: true,
    params
  })
}
//查看模型
export async function getModel(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/configure/models',
    showLoading: true,
    params
  })
}
//查询模型对应的参数方案
export async function getPmSchemes(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/configure/pmSchemes',
    showLoading: true,
    params
  })
}
//区域方案保存
export async function saveAreaSchemes(data) {
  return gstyRequest.post({
    url: '/calc/zone/scheme/configure/save',
    showLoading: true,
    data
  })
}
//添加区域方案场次
export async function addAreaCount(data) {
  return gstyRequest.post({
    url: '/calc/zone/scheme/cc/add',
    showLoading: true,
    data
  })
}
//区域方案场次列表
export async function getSchemesCount(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/cc/list',
    showLoading: true,
    params
  })
}
// 区域方案发布状态
export async function setPublishArea(data) {
  return gstyRequest.post({
    url: '/calc/zone/scheme/setPublish',
    showLoading: true,
    data
  })
}
// 河系方案发布状态
export async function setPublishRsys(data) {
  return gstyRequest.post({
    url: '/calc/rsys/scheme/setPublish',
    showLoading: true,
    data
  })
}
// 流域方案发布状态
export async function setPublishBasin(data) {
  return gstyRequest.post({
    url: '/calc/basin/scheme/setPublish',
    showLoading: true,
    data
  })
}
//删除场次
export async function deleteCount(data) {
  return gstyRequest.post({
    url: '/calc/zone/scheme/cc/delete',
    showLoading: true,
    data
  })
}
//查询场次计算结果
export async function getCountResult(params) {
  return gstyRequest.get({
    url: '/calc/zone/scheme/cc/result',
    showLoading: true,
    params
  })
}
//@@@@河系
//查看河系<河系结构树绑定>
export async function getRsysList(params) {
  return gstyRequest.get({
    url: '/calc/rsys/list',
    showLoading: true,
    params
  })
}
// 回显流域查看河系
export async function getRsysListByZid(params) {
  return gstyRequest.get({
    url: '/calc/basin/getRsys',
    showLoading: true,
    params
  })
}
// 流域回显
export async function getBasinDetail(params) {
  return gstyRequest.get({
    url: '/calc/basin/detail',
    showLoading: true,
    params
  })
}
//查询时效评定结果
export async function getRiverDurResult(params) {
  return gstyRequest.get({
    url: '/calc/rsys/scheme/cc/durResult',
    showLoading: true,
    params
  })
}
//查询精度评定结果
export async function getRiverEvaResult(params) {
  return gstyRequest.get({
    url: '/calc/rsys/scheme/cc/evaResult',
    showLoading: true,
    params
  })
}
//删除河系场次
export async function deleteRsysCount(data) {
  return gstyRequest.post({
    url: '/calc/rsys/scheme/cc/delete',
    showLoading: true,
    data
  })
}
// 根据流域查看河系

//新建河系
export async function addRiver(data) {
  return gstyRequest.post({
    url: '/calc/rsys/add',
    showLoading: true,
    data
  })
}
//修改河系
export async function updateRiver(data) {
  return gstyRequest.post({
    url: '/calc/rsys/modify',
    showLoading: true,
    data
  })
}

//保存河系方案
export async function saveRiverScheme(data) {
  return gstyRequest.post({
    url: '/calc/rsys/scheme/saveZoneSchemes',
    showLoading: true,
    data
  })
}
//查询河系方案计算场次计算结果
export async function getCcResult(params) {
  return gstyRequest.get({
    url: '/calc/rsys/scheme/cc/result',
    showLoading: true,
    params
  })
}
//添加河系方案场次
export async function addCcScheme(data) {
  return gstyRequest.post({
    url: '/calc/rsys/scheme/cc/add',
    showLoading: true,
    data
  })
}
//河系方案场次列表
export async function getCcScheme(params) {
  return gstyRequest.get({
    url: '/calc/rsys/scheme/cc/list',
    showLoading: true,
    params
  })
}
//删除河系方案
export async function deleteRiverScheme(data) {
  return gstyRequest.post({
    url: '/calc/rsys/scheme/delete',
    showLoading: true,
    data
  })
}
//删除河系
export async function deleteRiver(data) {
  return gstyRequest.post({
    url: '/calc/rsys/delete',
    showLoading: true,
    data
  })
}
//保存流域
export async function saveBasin(data) {
  return gstyRequest.post({
    url: '/calc/basin/saveBasin',
    showLoading: true,
    data
  })
}
//删除流域
export async function deleteBasin(data) {
  return gstyRequest.post({
    url: '/calc/basin/deleteBasin',
    showLoading: true,
    data
  })
}
//查询河系的计算区域
export async function getZoneList(params) {
  return gstyRequest.get({
    url: '/calc/rsys/zoneList',
    showLoading: true,
    params
  })
}
//查询河系方案的区域方案
export async function getZoneSchemes(params) {
  return gstyRequest.get({
    url: '/calc/rsys/scheme/zoneSchemes',
    showLoading: true,
    params
  })
}
//查询河系方案
export async function getRiverScheme(params) {
  return gstyRequest.get({
    url: '/calc/rsys/scheme/list',
    showLoading: true,
    params
  })
}
//
//%%%%%%%%%%
//添加计算方案
export async function addScheme(data) {
  return gstyRequest.post({
    url: '/calScheme/add',
    showLoading: true,
    data
  })
}
//查询预报断面设置得计算方案
export async function getSectionSchemeInfos(params) {
  return gstyRequest.get({
    url: '/calScheme/getSectionSchemeInfos',
    showLoading: true,
    params
  })
}
//添加预报断面设置的计算方案信息
export async function addSectionSchemeInfos(data) {
  return gstyRequest.post({
    url: '/calScheme/addSectionSchemeInfos',
    showLoading: true,
    data
  })
}
//查询方案断面配置状态
export async function getSchemeSectionStatus(params) {
  return gstyRequest.get({
    url: '/calScheme/getSchemeSectionStatus',
    showLoading: true,
    params
  })
}
//更新计算方案发布状态
export async function updateCalculationSchemePulish(data) {
  return gstyRequest.post({
    url: '/calScheme/updateCalculationSchemePulish',
    showLoading: true,
    data
  })
}
//查询时空变源单元方案
export async function getUnitSchemeInfos(params) {
  return gstyRequest.get({
    url: '/skby/getUnitSchemeInfos',
    showLoading: true,
    params
  })
}
//查询水库调度方案
export async function getReservoirScheme(params) {
  return gstyRequest.get({
    url: '/reservoir/getReservoirScheme',
    showLoading: true,
    params
  })
}
//区域方案场次计算 /calc/zone/scheme/cc/calculate
export async function areaCalculate(data) {
  return gstyRequest.post({
    url: '/calc/zone/scheme/cc/calculate',
    showLoading: true,
    data
  })
}
//查询河系的计算区域的所有区域方案

export async function getZoneSchemesList(params) {
  return gstyRequest.get({
    url: '/calc/rsys/zoneSchemesList',
    showLoading: true,
    params
  })
}
//河系方案场次计算
export async function riverSchemeCountComput(data) {
  return gstyRequest.post({
    url: '/calc/rsys/scheme/cc/calculate',
    showLoading: true,
    data
  })
}
//查看流域
export async function getBasinList(params) {
  return gstyRequest.get({
    url: '/calc/basin/list',
    showLoading: true,
    params
  })
}
//查看流域方案
export async function getBasinSchemeList(params) {
  return gstyRequest.get({
    url: '/calc/basin/scheme/list',
    showLoading: true,
    params
  })
}
//查看流域下子流域方案（河系/区域）
export async function getBasinChildrenSchemes(params) {
  return gstyRequest.get({
    url: '/calc/basin/scheme/childrenSchemes',
    showLoading: true,
    params
  })
}
//查询方案模型类型
export async function getCalcModelType(params) {
  return gstyRequest.get({
    url: '/calc/types',
    showLoading: true,
    params
  })
}
//查询方案模型类型
export async function getCalcZoneInfo(params) {
  return gstyRequest.get({
    url: '/calc/zone/getCalcZoneInfo',
    showLoading: true,
    params
  })
}
//修改区域
export async function postModify(data) {
  return gstyRequest.post({
    url: '/calc/zone/modify',
    showLoading: true,
    data
  })
}

//查看流域下子流域方案（河系/区域）
export async function getChildrenSchemes(params) {
  return gstyRequest.get({
    url: '/calc/basin/scheme/childrenSchemes',
    showLoading: true,
    params
  })
}
//保存流域方案
export async function saveBasinSchemes(data) {
  return gstyRequest.post({
    url: '/calc/basin/scheme/saveBasinSchemes',
    showLoading: true,
    data
  })
}
//删除流域方案
export async function saveBasinSchemesDelete(data) {
  return gstyRequest.post({
    url: '/calc/basin/scheme/delete',
    showLoading: true,
    data
  })
}
